package com.usian.stock.controller;

import com.usian.stock.model.Stock;
import com.usian.stock.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/11 14:34
 */

@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    StockService stockService;

    @PostMapping("/ipdateSt")
    public String updateStock(@RequestBody Stock stock){
        stockService.updateStock(stock);
        return "OK";

    }
}
